import Vue from 'vue'
import Router from 'vue-router'
//import index from '@/views/index'
const Home = resolve => require(['@/components/Home'], resolve)

const index = resolve => require(['@/views/index'], resolve)

const Theming = resolve => require(['@/views/Theming'], resolve)
const Grid = resolve => require(['@/views/Grid'], resolve)
const Buttons = resolve => require(['@/views/Buttons'], resolve)
const Card = resolve => require(['@/views/Card'], resolve)
const List = resolve => require(['@/views/List'], resolve)
const Modal = resolve => require(['@/views/Modal'], resolve)
const Alert = resolve => require(['@/views/Alert'], resolve)
const Panel = resolve => require(['@/views/Panel'], resolve)
const Loader = resolve => require(['@/views/Loader'], resolve)
const TabsAndSteps = resolve => require(['@/views/TabsAndSteps'], resolve)
const Other = resolve => require(['@/views/Other'], resolve)

const Table = resolve => require(['@/views/Table'], resolve)
const Datatable = resolve => require(['@/views/Datatable'], resolve)

const uform = resolve => require(['@/views/form'], resolve)

const PricingTable = resolve => require(['@/views/PricingTable'], resolve)
const Chart = resolve => require(['@/views/Chart'], resolve)

const Glyphicons = resolve => require(['@/views/Glyphicons'], resolve)
const FontAwesomes = resolve => require(['@/views/FontAwesomes'], resolve)

const testFrom = resolve => require(['@/views/testFrom'], resolve)

Vue.use(Router)

export default new Router({
	routes: [
	{ path: '/', redirect: '/index',hidden:'true' },
	{
		path: '/',
		component:Home, 
		icon:"fa fa-home",
		children:[
		{path:'/index', component:index, name:'首页'},
		]
	},    
	{
		path: '/',
		name: 'UIKits',
		component:Home, 
		icon:"fa fa-desktop",
		children:[
		{path:'/testFrom', component:testFrom, name:'自定义表单'},
		{path:'/Theming', component:Theming, name:'Theming'},
		{path:'/Grid', component:Grid, name:'Grid'},
		{path:'/Buttons', component:Buttons, name:'Buttons'},
		{path:'/Card', component:Card, name:'Card'},
		{path:'/List', component:List, name:'List'},
		{path:'/Modal', component:Modal, name:'Modal'},
		{path:'/Alert', component:Alert, name:'Alert'},
		{path:'/Panel', component:Panel, name:'Panel'},
		{path:'/Loader', component:Loader, name:'Loader'},
		{path:'/TabsAndSteps', component:TabsAndSteps, name:'Tabs&Steps'},
		{path:'/Other', component:Other, name:'Other'},
		]
	},
	{
		path: '/',
		name: 'Table2',
		component:Home, 
		icon:"fa fa-table",
		children:[
		{path:'/Table', component:Table, name:'Table'},
		{path:'/Datatable', component:Datatable, name:'Datatable'}
		]
	},
	{
		path: '/',
		name: 'myForm',
		component:Home, 
		icon:"fa fa-file-text-o",
		children:[
		{path:'/Form', component:uform, name:'Form'},
		]
	},
	{
		path: '/',
		name: 'Components',
		component:Home, 
		icon:"fa fa-cubes",
		children:[
		{path:'/PricingTable', component:PricingTable, name:'PricingTable'},
		{path:'/Chart', component:Chart, name:'Chart'}
		]
	},
	{
		path: '/',
		name: 'Icons',
		component:Home,
		icon:"fa fa-tachometer", 
		children:[
		{path:'/Glyphicons', component:Glyphicons, name:'Glyphicons'},
		{path:'/FontAwesomes', component:FontAwesomes, name:'FontAwesomes'}
		]
	},
	]
})
